package edu.princeton.cogsci.wn.ascii;

/** This class models the WordNet library type SnsIndex. It has package-
 *  private security because it should only be used within the Ascii WordNet
 *  implementation.
 */

class CSenseIndex
{
  String sensekey;  // The String representation of the sense key.
  String word;      // The String representation of the word form.
  int loc;          // The synset byte offset.
  int wnsense;      // The WordNet sense number.
  int tag_cnt;      // The frequency count.

  /** This JNI function returns a reference to a new CSenseIndex Java object,
   *  which represents the sense index entry for the sense key given by the
   *  senseKey parameter, or the null reference if no sense index entry exists
   *  for that sense key.
   *
   *  If senseKey is NULL, this function throws an IllegalArgumentException
   *  and returns NULL. If wninit( ), strdup( ), or GetSenseIndex( ) fail,
   *  this function throws a WordNetException and returns NULL. If
   *  AllocObject( ) fails, this function returns NULL and propogates
   *  whatever Exception AllocObject raised.
   *
   *  No bounds-checking is performed on the JNIEnv or jclass parameters,
   *  since the JVM is assumed to perform correctly. Undetermined behavior
   *  will result if either of these variables are NULL.
   *
   *  Implementation note: This function is glue for the WordNet library
   *  function SnsIndexPtr GetSenseIndex( char* ).
   */
  static native CSenseIndex lookup( String senseKey );
}
